package com.freen.fadmin.repository.sysuser;

import com.freen.fadmin.entity.sysuser.SysUser;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;


import java.util.List;

public interface SysUserRepository extends JpaRepository<SysUser,Integer> {
    SysUser findByName(String name);
    SysUser findById(int id);
    SysUser findByPhone(String mobile);
    Page<SysUser> findByNameLike(String name,Pageable pageable);
    Page<SysUser> findByNameLikeOrPhoneLikeOrCnnameLike(String name,String phone ,String cnname, Pageable pageable);
    //SysUser findByNameLikeOrPhoneLikeOrCnnameLike(String keyword);
}
